//
//  XCardPackageButton.m
//  ReceiveVouchers
//
//  Created by admin on 2017/7/10.
//  Copyright © 2017年 ReceiveVouchers. All rights reserved.
//

#import "XCardPackageButton.h"


#define CenterMargin 10

@implementation XCardPackageButton


- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self setupSubView];
    }
    return self;
}


- (void)setupSubView
{
    UILabel *countLbl = [[UILabel alloc] init];
    countLbl.text = @"";
    countLbl.font = VRFont(20);
    countLbl.textColor = RGB(51, 51, 51);
    [self addSubview:countLbl];
    self.countLbl = countLbl;
    [countLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self.mas_centerY).offset(-3);
        make.centerX.mas_equalTo(self);
    }];
    
    UILabel *titleLbl = [[UILabel alloc] init];
    titleLbl.text = @"";
    titleLbl.font = VRFont(14);
    titleLbl.textColor = RGB(112, 99, 59);
    [self addSubview:titleLbl];
    self.titleLbl = titleLbl;
    [titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.mas_centerY).offset(3);
        make.centerX.mas_equalTo(self);
    }];
}







@end
